﻿package lobby.exchangeddata
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import lobby.events.LobbyEvent;
	
	/**
	 * ...
	 * @author Doan Nguyen Thuy Nha Truc (Bamboo)
	 */
	public class HistoryInfoRoulette extends HistoryInfoBase
	{
		public function HistoryInfoRoulette()
		{
			this.gameTypeIndex = 5;
		}
		
		public override function returnSetHistory(result:String):Array
		{
			super.setOdlResult = result;
			var MAX_NUM_CHECKERS:int = 66;
			result = result.substr(38, result.length);
			var sNumResult:int = parseInt(result.substr(0, 3));
			var sTemp:String = result.substr(3, result.length);
			
			if (sNumResult > MAX_NUM_CHECKERS)
			{
				sTemp = sTemp.substr((sNumResult - MAX_NUM_CHECKERS) * 2, (MAX_NUM_CHECKERS * 2));
			}
			//trace("sTemp:" + sTemp);
			var resultArr:Array = new Array();
			while (sTemp.length >= 2)
			{
				resultArr.push(parseInt(sTemp.slice(0, 2)));
				sTemp = sTemp.slice(2, sTemp.length);
			}
			return resultArr;
		}
	}

}